<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style>
			*{
				margin:0;
				padding:0;
			}
			div{
				background: yellow;
			}
			span{
				background: cyan;
				/*行元素只有左右外边距,没有上下外边距*/
				margin:50px;
			}
			#div1{
				/*设置div1周围有20像素的外边距*/
				/*块元素有四个方向的外边距*/
				margin:20px;
			}
			
		</style>
	</head>
	<body>
		<div id="div1">div1</div>
		<div>div2</div>
		<span>span1</span>
		<span>span2</span>
	</body>
</html>
